<ion-view view-title="开退货单">
  <ion-content>

    <ion-list class="wrap-light2">

         <ion-item class="item-input">
          <a class="col" ng-click="selectSaleOrder();">选择销售单</a>
          <a class="button button-col icon ion-ios-barcode-outline" ng-click="scanBarcode()"> 扫码</a>
        </ion-item>





        <ion-item class="item-select">
            <span class="input-label">类型</span>

            <select>
              <option selected>换货</option>
              <option>退货</option>
            </select>
        </ion-item>


        <ion-item class="item item-input">
            <span class="input-label">客户</span>
            <input type="text" name="uname" maxlength="20" required placeholder="可选" ng-model="order.company" ng-click="openModal()">
            <span class="ion-minus-circled" ng-show="signupForm.uname.$dirty && signupForm.uname.$invalid "></span>
        </ion-item>

        <ion-item class="item item-select">
            <span class="input-label">入库仓库</span>
            <select>
              <option>总仓</option>
              <option selected>仓库1</option>
              <option>仓库2</option>
              <option>仓库3</option>
              <option>仓库4</option>
            </select>
        </ion-item>
        <ion-item class="item item-divider">
            选择商品
        </ion-item>
        <ion-item class="item item-input">
            <section class="grid-response wrap-light">
                <a class="grid-item" ng-click="scanBarcode()">
                    <i class="icon icon-top ion-qr-scanner"></i>
                    <span>扫码添加</span>
                </a>
                <a class="grid-item" href="#/select-products">
                    <i class="icon icon-top ion-ios-list-outline"></i>
                    <span>从列表选择</span>
                </a>

                <a class="grid-item" href="#/add-products">
                    <i class="icon icon-top ion-ios-list-outline"></i>
                    <span>直接退货</span>
                </a>
            </section>
        </ion-item>

    </ion-list>

        <div class="list accordion-list product-select-list" ng-if="isReturn()">

        <ion-item class="item item-divider">
            已选商品
        </ion-item>

            <div ng-repeat="item in products" class="item item-thumbnail-left">
                <div class="row">
                    <img ng-src="{{item.thumb}}" class="item-image"/>
                    <div class="col">
                        <div class="title">{{item.type}}</div>

                    </div>
                    <div class="col col-blank accordion-handle arrow right-bottom-arrow" ng-class="{on: isItemShown(item)}"  ng-click="toggleItem(item)"></div>
                </div>
                <div class="item-accordion" ng-if="isItemShown(item)">


                </div>
            </div>
        </div>




        <a class="button button-block button-balanced" ng-click="updateAccount();" ng-if="isReturn()" href="#/buy">开单</a>

  </ion-content>
</ion-view>
